package com.shiyi.utils;

import cn.dev33.satoken.secure.SaSecureUtil;

import java.util.*;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.stream.Stream;

/**
 *  <p> 加密工具 </p>
 *
 * @description:
 * @author: blue
 * @date: 2019/10/13 0013 15:25
 */
public class AesEncryptUtils {

    final static String key = "bihe1999";
    /**
     * 校验内容是否一致
     */
    public static boolean validate(String target, String target1) {
        return target.equalsIgnoreCase(aesEncrypt(target1));
    }

    /**
     * AES加密
     *
     * @param password：密码
     * @return
     */
    public static String aesEncrypt(String password){
        return SaSecureUtil.aesEncrypt(key, password);
    }



    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        // 注意 hasNext 和 hasNextLine 的区别
        while (in.hasNextLine()) { // 注意 while 处理多个 case
            String string = in.nextLine();
            String res = "";
            int temp = 0;
            int num = Integer.parseInt(string);
            for (int i = 2; i <= num; i++) {
                int i1 = num % i;
                if (i1==0){
                    num = num / i;
                    if (temp>2){
//                        System.out.println("-1 -1");
                        break;
                    }
                    res= res + i + " ";
                    i=1;
                    temp++;
                }
            }
            if (temp>2){
                System.out.println("-1 -1");
            }else if (temp==2){
                System.out.println(res);
            }else {
                System.out.println("-1 -1");
            }

        }
    }




}
